#!/usr/local/bin/python
import os
import cherrypy

class JdWebCom:
	def index(self):
		return 'jdweb.com index page. (by cherrypy)'
	index.exposed = True

root = JdWebCom()

application = cherrypy.tree.mount(root)
try:
	pass  #	cherrypy.engine.start(blocking=False)
finally:
	pass;


'''
application = cherrypy.tree.mount(r)
cherrypy.engine.start(blocking=False)

try:
	WSGIServer(application).run()
finally:
	cherrypy.engine.stop()
'''

def start():
	'''
	cherrypy.config.update({
			'log.error_file': os.path.join(os.path.dirname(__file__), 'site.log'),
			'environment': 'production',
			})
	'''
	'''
	try:
		WSGIServer(application).run()
	finally:
		cherrypy.engine.stop()
	'''


if __name__ == "__main__":
	start()

